package com.niceweather.android.logic.network.service

import com.niceweather.android.base.BaseApplication
import com.niceweather.android.logic.model.PlaceResponse
import retrofit2.Call
import retrofit2.http.GET
import retrofit2.http.Query

/**
 *
 * Created by callhh on 2020/6/14
 * 网络层 - 定义接口 - 地点
 */
interface PlaceService {

    /**
     * GET请求
     * 搜索城市数据
     * 返回值Call<PlaceResponse> 这样retrofit就会将服务器返回的JSON自动解析成PlaceResponse对象
     */
    @GET("v2/place?token=${BaseApplication.CAIYUN_TOKEN}&lang=zh_CN")
    fun searchPlaces(@Query("query")query: String ): Call<PlaceResponse>


}